import java.util.HashMap;
import java.util.concurrent.TimeUnit;

public class Test1 {

    public static void main(String[] args) throws InterruptedException {
        HashMap hashMap = new HashMap<>();
        hashMap.put("1", "11111");
        hashMap.put("2", "22222");
        for (Object o : hashMap.entrySet()) {
            System.out.println(o);
        }

        for (Object o : hashMap.keySet()) {
            System.out.println(o);
        }

        hashMap.forEach((k, v) -> System.out.println("key: " + k + " value:" + v));

        A a = new A();
        a.aMethod();

        A.aMethod();

    }
    static class A {

        public static synchronized void aMethod() throws InterruptedException {
            System.out.println("aMethod sleep 10s");
            TimeUnit.SECONDS.sleep(10);
        }
    }
}


